Crate puffin

source ·
Expand description

Usage:

fn main() {
    puffin::set_scopes_on(true); // you may want to control this with a flag

    // game loop
    loop {
        puffin::GlobalProfiler::lock().new_frame();

        {
            puffin::profile_scope!("slow_code");
            slow_code();
        }

    }
}

Re-exports§

  • pub use utils::clean_function_name;
  • pub use utils::short_file_name;
  • pub use utils::type_name_of;

Macros§

Structs§

Enums§

  • TODO: Improve encapsulation. Errors that can happen when parsing a Stream of profile data.
  • Scopes are identified by user-provided name while functions are identified by the function name.

Functions§

Type Aliases§